import java.util.ArrayList;
import java.util.List;

/**
 * 调用者
 */
public class Broker {
    private List<Order> orderList = new ArrayList<Order>();

    //下单
    public void takeOrder(Order order) {
        orderList.add(order);
    }

    //订购
    public void placeOrder(){
        for (Order item : orderList) {
            item.excute();
        }

        orderList.clear();
    }
}
